package com.feng.paper.controller;

import com.feng.common.vo.ApiRest;
import com.feng.paper.dto.SaveAnswerDto;
import com.feng.paper.service.PaperQuAnswerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 试卷考题备选答案 前端控制器
 * </p>
 *
 * @author feng
 * @since 2023-03-23 20:30:42
 */
@RestController
@RequestMapping("/paper/paperQuAnswer")
@CrossOrigin
@Api(tags = "试卷模块")
public class PaperQuAnswerController {

    @Autowired
    private PaperQuAnswerService paperQuAnswerService;

    @PostMapping
    @ApiOperation("保存用户答题信息")
    public ApiRest saveAnswer(@RequestBody SaveAnswerDto saveAnswerDto) {
        return paperQuAnswerService.saveAnswer(saveAnswerDto);
    }
}
